#!/usr/bin/env python
'''
An example of reading and writing Unicode strings:Writes
a Unicode string to a file in utf-8 and read it back in.
'''
import codecs

CODEC = 'utf-8'
FILE = 'unicode.txt'

hello_out = u'Hello world\n'
f = codecs.open(FILE, 'w', CODEC)
f.write(hello_out)
f.close()

f = codecs.open(FILE, 'r')
bytes_in = f.read()
f.close()
print(bytes_in)
